{include file="home/site_header.tpl"}
{include file="home/site_menu.tpl"}
	
	
				<!-- Content -->
				<div id="content" class="wrapper">
					{include file="home/sidebar_right.tpl"}
				<div class="largeCol" >
				<div class="innerpage_title_center" style='margin-top: -70px;margin-left:-10px;'>
					<div class="innerpage_title_transp">
						<h1>Formulir Pendaftaran Taruna Baru</h1>
					</div> 
				</div>
					<style>
					   label {
					    display:inline-block;
					    width:170px;
							padding:5px 0 5px 0;
					   }
					</style>

{if $data.pin eq ""}
	Anda tidak bisa mengakses halaman ini.
	
	<br />
	<br />
	<a href="{$site.site}site/informasi/pendaftaran"> Back </a>
	
{else}
	
	<form id="form_pendaftaran" name="form_pendaftaran" class="form columns" action="{$site.site}ajax/pendaftaranUpdate/" method="POST" enctype="multipart/form-data";>
	<small class="error-desc" style="margin-left: 174px;">Semua Field bertanda (*) Wajib Diisi</small><br>
	<!--
	<label>Nomor Pendaftaran</label>
		<input id="no_pendaftaran" name="no_pendaftaran" class="mandatory" type="text"  size="30" maxlength="30" value='{$i.no_pendaftaran}' disabled="true"
			class="input-small input-tip"; /> Diisi Oleh System<br/>
	
	<label>PIN</label>
	 
		<input id="pin" class="mandatory" name="pin" type="text"  size="30" maxlength="7" value='{$data.pin}' class="input-small input-tip" disabled="true"/>
		<font style=color:red;>*</font><br/>
	-->		
		<input type="hidden" id="pin" 	name="pin"  	 value="{$data.pin}"/>
		
	
	<label>Nama Calon</label>
		<input id=nama name="nama" class="mandatory" type="text" value='{$i.nama}' size="30" maxlength="30" class="input-small input-tip"; />
		<font style=color:red;>*</font><br/>

	<label>Tempat Lahir</label>
		<input id="tempat_lahir" name="tempat_lahir" class="mandatory" type="text" value='{$i.tempat_lahir}' size="15" maxlength="15" class="input-small input-tip"; />
		<font style=color:red;>*</font><br/>

	<label for="select">Tanggal Lahir</label>
	
		<select id="tgl_lahir_dd" name="tgl_lahir_dd"  class="mandatory">
	  		<option value='0'>Pilih Tanggal</option>
		  	{php}
									$i=1;
									$j=$i + 30;
									for ($i; $i <= $j; $i++) {
										echo "<option value='$i'>$i</option>";
									}
				{/php}
		</select>
	
		<select id="tgl_lahir_mm" name="tgl_lahir_mm" class="mandatory">
	  		<option value='0'>Pilih Bulan</option>
			  	{php}
			  		$bln = array( "1" => "Januari", "2" => "Februari", "3" =>"Maret", "4" => "April", "5" =>"Mei", "6" => "Juni", 
			  		"7" => "Juli", "8" => "Agustus", "9" => "September", "10" => "Oktober", "11" => "November", "12" => "Desember");
			  		
			  		foreach ($bln as $key => $value) {
							echo "<option value='$key'>$value</option>";
						}
			  	{/php}
	  </select>
	  
		<select id="tgl_lahir_yy" name="tgl_lahir_yy" class="mandatory">
		  <option value='0'>Pilih Tahun</option>
			  	{php}
			  		$i=1988;
			  		$j=$i + 6;
			  		for ($i; $i <= $j; $i++) {
			  			echo "<option value='$i'>$i</option>";
			  		}
			  	{/php}
		</select><font style=color:red;>*</font><br/>
		
	<label>Jenis Kelamin</label>
		<input id="jenis_kelamin" name="jenis_kelamin" type="radio" value="0" {$i.Laki-laki} class="mandatory"/> Laki-laki
		<input id="jenis_kelamin"  name="jenis_kelamin" type="radio" value="1" {$i.Perempuan} class="mandatory"/> Perempuan
		<font style=color:red;>*</font><br/>

	<!--tinggi badan-->
	<label for="label4">Tinggi Badan</label>
		<select name="tinggi_badan" id="tinggi_badan" class="mandatory">
		  <option value='0'>Pilihan...</option>
			  {php}
					$i=153;
					$j=$i + 32;
					for ($i; $i <= $j; $i++) {
						echo "<option value='$i'>$i</option>";
					}
				{/php}
		</select><font style=color:red;>*</font><br>
		
	<!--Agama-->
	<label for="label7">Agama</label>
		<select id="agama" name="agama" class="mandatory">
	  		<option value='0'>Pilihan...</option>
				<option value='Islam'>01 - Islam</option>	
				<option value='Protestan'>02 - Protestan</option>	
				<option value='Khatolik'>03 - Khatolik</option>	
				<option value='Hindu'>04 - Hindu</option>	
				<option value='Budha'>05 - Budha</option>	
				<!--		{foreach name=agama from=$agama item=x}
				 				<option value='{$x.agama}' {if $x.agamaID eq $i.agamaID}selected{/if}>{$x.code} - {$x.agama} </option>";
				 				{/foreach}
				-->
		</select><font style=color:red;>*</font><br/>
	
	<!--propinsi asal-->
	<label for="label5">Propinsi Asal SMTA</label>

		<select id="propinsiID" name="propinsiID" class="mandatory" >
			<option value='0'>Pilihan...</option>
			<option value='Nangroe Aceh Darussalam'>11 - Nangroe Aceh Darussalam</option>
			<option value='Sumatera Utara'>12 - Sumatera Utara</option>
			<option value='Sumatera Barat'>13 - Sumatera Barat</option>
			<option value='Riau'>14 - Riau</option>
			<option value='Kepulauan Riau'>15 - Kepulauan Riau</option>
			<option value='Jambi'>16 - Jambi</option>
			<option value='Sumatera Selatan'>17 - Sumatera Selatan</option>
			<option value='Bengkulu'>18 - Bengkulu</option>
			<option value='Lampung'>19 - Lampung</option>
			<option value='Kep Bangka Belitung'>20 - Kep Bangka Belitung</option>
			<option value='Banten'>21 - Banten</option>
			<option value='DKI Jakarta'>22 - DKI Jakarta</option>
			<option value='Jawa Barat'>23 - Jawa Barat</option>
			<option value='Jawa Tengah'>24 - Jawa Tengah</option>
			<option value='DI Yogyakarta'>25 - DI Yogyakarta</option>				
			<option value='Jawa Timur'>26 - Jawa Timur</option>				
			<option value='Bali'>27 - Bali</option>				
			<option value='Nusa Tenggara Barat'>28 - Nusa Tenggara Barat</option>				
			<option value='Nusa Tenggara Timur'>29 - Nusa Tenggara Timur</option>				
			<option value='Kalimantan Barat'>30 - Kalimantan Barat</option>				
			<option value='Kalimantan Tengah'>31 - Kalimantan Tengah</option>				
			<option value='Kalimantan Selatan'>32 - Kalimantan Selatan</option>				
			<option value='Kalimantan Timur'>33 - Kalimantan Timur</option>				
			<option value='Gorontalo'>34 - Gorontalo</option>				
			<option value='Sulawesi Barat'>35 - Sulawesi Barat</option>				
			<option value='Sulawesi Utara'>36 - Sulawesi Utara</option>				
			<option value='Sulawesi Tengah'>37 - Sulawesi Tengah</option>				
			<option value='Sulawesi Selatan'>38 - Sulawesi Selatan</option>				
			<option value='Sulawesi Tenggara'>39 - Sulawesi Tenggara</option>				
			<option value='Maluku'>40 - Maluku</option>				
			<option value='Maluku Utara'>41 - Maluku Utara</option>				
			<option value='Papua'>42 - Papua</option>				
			<option value='Irian Jaya Barat'>43 - Irian Jaya Barat</option>
				<!--		{foreach name=propinsi from=$propinsi item=x}
								<option value='{$x.propinsi}' {if $x.propinsiID eq $i.propinsiID}selected{/if}>{$x.code} - {$x.propinsi}</option>";
								{/foreach}
				-->
		</select><font style=color:red;>*</font><br>
	
	<!--tahun lulus-->
	<label for="label6">Tahun Lulus SMTA</label>
		<select id="tahun_lulus" name="tahun_lulus" class="mandatory">
	  		<option value='0'>Pilihan...</option>
				{php}
					$i=1990;
					$j=$i + 21;
					for ($i; $i <= $j; $i++) {
						echo "<option value='$i'>$i</option>";
						}
				{/php}
		</select><font style=color:red;>*</font><br>
	
	<!--jenis smta-->
	<label for="label7">Jenis Asal SMTA</label>
		<select id="jenis_smtaID" name="jenis_smtaID" class="mandatory" onchange="changeValue()">
	  		<option value='0'>Pilihan...</option>
	  		
				<option value='SMA Umum'>01 - SMA Umum</option>
				<option value='Madrasah Aliyah'>02 - Madrasah Aliyah</option>
				<option value='SMK'>03 - SMK</option>
				<!--
				 	 		{foreach name=jenisSmta from=$jenisSmta item=x}
				 				<option value='{$x.jenis}' {if $x.jenis_smtaID eq $i.jenis_smtaID}selected{/if}>{$x.code} - {$x.jenis} </option>";
					   	{/foreach}
				--> 	
		</select><font style=color:red;>*</font><br/>
	
	<!--jurusan SMTA-->
	<label for="label8">Jurusan SMTA</label>
		<select id="jurusan_smtaID" name="jurusan_smtaID" class="mandatory">
	  		<option value='0'>Pilihan...</option>
				
				<option value='IPA'>01 - IPA</option>
				<option value='Elektro'>02 - Elektro</option>
				<option value='Elektronika'>03 - Elektronika</option>
				<option value='Telekomunikasi'>04 - Telekomunikasi</option>
				<option value='Komputer'>05 - Komputer</option>
				<!--
				 	  	{foreach name=jurusanSmta from=$jurusanSmta item=x}
				 				<option value='{$x.jurusan}' {if $x.jurusan_smtaID eq $i.jurusan_smtaID}selected{/if}>{$x.code} - {$x.jurusan} </option>";
				 			{/foreach}
				--> 	
		</select><font style=color:red;>*</font><br>
		 
	<!--pilihan jurusan-->
	<label id="jurusanID_desc">Pilihan Jurusan</label>
		<select id="jurusanID" name="jurusanID" class="mandatory">
			<option value='0'>Pilihan...</option>
			<option value='Meteorologi'>01 - Meteorologi</option>
			<option value='Geofisika'>02 - Geofisika</option>
			<option value='Klimatologi'>03 - Klimatologi</option>
			<option value='Instrumentasi'>04 - Instrumentasi</option>
  				<!--		{foreach name=jurusan from=$jurusan item=x}
								<option value='{$x.jurusan}' {if $x.jurusanID eq $i.jurusanID}selected{/if}>{$x.code} - {$x.jurusan} </option>";
								 	{/foreach}
					--> 
		</select><font style=color:red;>*</font><br>
	
	<!--pilihan lokasi test-->
	<label id="lokasiID">Pilihan Lokasi Tes</label>
		<select id="lokasiID" name="lokasiID" class="mandatory">
			<option value='0'>Pilihan...</option>
			<option value='11'>11 - Jakarta - AMG</option>
			<option value='12'>12 - Medan</option>
			<option value='13'>13 - Denpasar</option>
			<option value='14'>14 - Makasar</option>
			<option value='15'>15 - Jayapura</option>
			<option value='16'>16 - Palembang</option>
			<option value='17'>17 - Padang</option>
			<option value='18'>18 - Surabaya</option>
			<option value='19'>19 - Pontianak</option>
			<option value='20'>20 - Banjarmasin</option>
			<option value='21'>21 - Balikpapan</option>
			<option value='22'>22 - Palu</option>
			<option value='23'>23 - Manado</option>
			<option value='24'>24 - Kendari</option>
			<option value='25'>25 - Ternate</option>
			<option value='26'>26 - Ambon</option>
			<option value='27'>27 - Kupang</option>
			<option value='28'>28 - Merauke</option>
			<option value='29'>29 - Manokwari</option>
  				<!--  	{foreach name=lokasi from=$lokasi item=x}
								<option value='{$x.code}' {if $x.lokasiID eq $i.lokasiID}selected{/if}>{$x.code} - {$x.lokasi} </option>";
								 	{/foreach}
					--> 
		</select><font style=color:red;>*</font><br>
	
	<!--nilai title -->
	<label>&nbsp;</label>

		<input type="text"  size="10" value="Matematika" class="input-small1"; readonly; disabled='true'"/> 
		<input type="text"  size="10" value="Fisika" class="input-small1"; readonly; disabled='true'"/> 
		<input type="text"  size="10" value="Inggris" class="input-small1"; readonly; disabled='true'"/> 


	<br/>

	<!--Semester 2 Kelas 11-->
	<label>Nilai Semester 2 Kls 11</label>

		<input id="mat_4"  name="mat_4" type="text"  value='{$i.mat_4}' size="10" maxlength="3" class="input-small1" class="mandatory"/> 
		<input id="fisika_4" name="fisika_4" type="text"  value='{$i.fisika_4}' size="10" maxlength="3" class="input-small1" class="mandatory"/> 
		<input id="inggris_4" name="inggris_4" type="text"  value='{$i.inggris_4}' size="10" maxlength="3" class="input-small1" class="mandatory"/>
	<font style=color:red;>*</font><br/>
	
	
	<!--Semester 1 Kelas 12-->
	<label for="label11">Nilai Semester 1 Kls 12</label>
		<input id="mat_5"  name="mat_5" type="text"  value='{$i.mat_5}' size="10" maxlength="3" class="input-small1" class="mandatory"/> 
		<input id="fisika_5" name="fisika_5" type="text"  value='{$i.fisika_5}' size="10" maxlength="3" class="input-small1" class="mandatory"/> 
		<input id="inggris_5" name="inggris_5" type="text"  value='{$i.inggris_5}' size="10" maxlength="3" class="input-small1" class="mandatory"/> 
	<font style=color:red;>*</font><br/>
	
	<!--Semester 2 Kelas 12-->
	<label for="label11">Nilai Semester 2 Kls 12</label>
		<input id="mat_6" name="mat_6" type="text"  value='{$i.mat_6}' size="10" maxlength="3" class="input-small1" class="mandatory"/> 
		<input id="fisika_6" name="fisika_6" type="text"  value='{$i.fisika_6}' size="10" maxlength="3" class="input-small1" class="mandatory"/> 
		<input id="inggris_6" name="inggris_6" type="text"  value='{$i.inggris_6}' size="10" maxlength="3" class="input-small1" class="mandatory"/> 
	<font style=color:red;>*</font>
	<br/>
	
	<!--nilai keterangan isi-->
	<label>&nbsp;</label>
		<font style=color:red;>* nilai diisi dengan angka, skala 0,0-10,0. Mis : fisika = 7,5</font>
	<br/>
	
	<label>Nama Orang Tua</label>
		<input id=ayah name="ayah" class="mandatory" type="text" value='{$i.ayah}' size="30" maxlength="30" class="input-small input-tip" title="Ayah"; />
		<font style=color:red;>*</font><br/>
		
	<label>&nbsp;</label>
		<input id=ibu name="ibu" class="mandatory" type="text" value='{$i.ibu}' size="30" maxlength="30" class="input-small input-tip" title="Ibu"; />
		<font style=color:red;>*</font><br/>
		
	<label>Alamat Rumah</label>
		<textarea id=alamat name="alamat" class="mandatory" type="text" value='{$i.alamat}' size="200" maxlength="200" class="input-large input-tip" cols="27" rows="4"; ></textarea>
		<font style=color:red;>*</font><br/>
	
	<label>Kode Pos</label>
		<input id=kodepos name="kodepos" class="mandatory" type="text" value='{$i.kodepos}' size="30" maxlength="10" class="input-small input-tip"; />
		<font style=color:red;>*</font><br/>
		
	<label>Telepon / HP</label>
		<input id=telepon name="telepon" class="mandatory" type="text" value='{$i.telepon}' size="30" maxlength="40" class="input-small input-tip"; />
		<font style=color:red;>*</font><br/>
		
	<label>Email</label>
		<input id=email name="email" class="mandatory" type="text" value='{$i.email}' size="30" maxlength="30" class="input-small input-tip"; />
		<font style=color:red;>*</font><br/>
		
	<label>Foto</label>
				<input type="file" id="foto" name="foto" class="input-small1" class="mandatory" size="22" maxlength="30" />
				<font style=color:red;>*</font>
				<br style="height:5px;line-height:5px;"><br style="height:5px;line-height:5px;">
				{if strlen($i.img_1) > 0}
				{$i.img_1}<br/>
				<img src='{$site.site}{$i.img_1}' alt='Foto Utama' style="max-width:150px;" />
				{/if}
				
			<label>&nbsp;</label>
			<input id="agree" name="agree" type="checkbox" value='1' class="mandatory"/>
			<font style=color:red;>Dengan ini, Saya menyatakan bahwa data yang Saya masukkan adalah 
			data yang sebenarnya, apabila data yang Saya masukkan tidak sesuai dengan fakta yang sesungguhnya maka 
			Saya bersedia didiskualifikasi.
			</font><br><br />
			
      <label>&nbsp;</label>
      <label style="margin-left:0px; padding:0; width:90px;" >
			<button id="btnsave" value="save" class="button altbutton" type="submit"/>Daftar</button>
			</label>

			<label style="margin-left:5px; padding:0; width:80px;">
			<button id="back" value="back" class="button altbutton" type="reset"/>Reset</button>
			</label>
			
			<label style="margin-left:10px; padding:0; width:200px;">
			<a class="button" href="{$site.site}site/informasi/pendaftaran" target="_blank">Syarat Pendaftaran</a>
			</a>
			</label>
</form>
<br>
{/if}
			</div>
	  </div>
	<!-- Content end -->


<script type="text/Javascript">
  function changeValue() {    
    var jenis_smtaID = document.getElementById("jenis_smtaID");
    if (jenis_smtaID.value == "SMA Umum") {
      document.getElementById("jurusan_smtaID").selectedIndex = 1;
    } else if (jenis_smtaID.value == "Madrasah Aliyah") {
      document.getElementById("jurusan_smtaID").selectedIndex = 1;
    } else if (jenis_smtaID.value == "SMK") {
      document.getElementById("jurusan_smtaID").selectedIndex = 2;
    } else {
  document.getElementById("jurusan_smtaID").selectedIndex = 0;
		}
  }
</script>


{include file="home/site_footer.tpl"}

